﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        lblTime.Text = DateTime.Now.ToString();
    }

    protected void btnSaveValue_Click(object sender, EventArgs e)
    {
        Profile.FirstName = (string)txtFname.Text;
        Profile.LastName = txtLname.Text;
        Profile.Age = txtAge.Text;
        Profile.FamilyDetails.MaritalStatus = txtMaritalStatus.Text;
        Profile.FamilyDetails.NumberOfChildren = txtNoOfChildren.Text;
        Profile.LastVisited = lblTime.Text;
    }
    protected void btnFetch_Click(object sender, EventArgs e)
    {
        lblShowFname.Text = Profile.FirstName;
        lblShowLname.Text = Profile.LastName;
        lblAge.Text = Profile.Age;
        lblMaritalStatus.Text = Profile.FamilyDetails.MaritalStatus;
        lblShowNoOfChildren.Text = Profile.FamilyDetails.NumberOfChildren;
        lblShowTime.Text = Profile.LastVisited;
    }
}